package org.example;

<<<<<<< HEAD
public class YootkDemo {
    public static void main(String[] args) {
        Ticket ticket = new Ticket(); // 对象实例化
        for (int x = 0; x < 5; x++) {
            // 售票处理1
            new Thread(ticket::sale, "售票员 - " + x).start();
=======
import java.io.*;
import java.nio.charset.StandardCharsets;

public class YootkDemo {
    public static void main(String[] args) throws Exception {
        File file = new File("F:" + File.separator + "mutant" + File.separator + "vip" +
                File.separator + "yootk.txt");
        if (!file.getParentFile().exists()) {
            if (!file.getParentFile().mkdirs()) {
                throw new IOException("无法创建目录: " + file.getParentFile().getAbsolutePath());
            }
        }
        // 打印写入的文件路径
        System.out.println("写入文件路径: " + file.getAbsolutePath());

        try (Writer out = new OutputStreamWriter(new FileOutputStream(file), StandardCharsets.UTF_8)) {
            out.write("：www.yootk.com\n");
            out.append("：edu.yootk.com");
>>>>>>> 41e1c012ff84df7382c463e36575b94aadf2e467
        }
    }
}
